<include file="__THEME__/header" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.form.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery.masonry.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery.LoadImage.js"></script>
<script type="text/javascript" src="{:U('weibo/plugins/init')}"></script>
<script>
$(document).ready(function(){
	weibo.init();
	var url = "{:U('home/User/searchTips')}";
	userAutoTips({id:'content_publish',url: url});
});
</script>
<style type="text/css">
<!--
.item {
  width: 224px;
  margin: 0px;
  float: left;

}
.content {min-height:400px!important;}
.mainbox_C {min-height:400px!important;}
.talkPop{ _margin-left:-320px;}
#emotions{_top:320px!important;*top:320px!important;}
-->
</style>
<script>
var II=0;
$(function(){
  $('#container').masonry({
    // options
    itemSelector : '.item',
    columnWidth : 247
  });
    $(".haibao .pic img").LoadImage(true,200,auto,"__THEME__/images/icon_waiting.gif");

});

window.onerror = ignoreError;
function ignoreError()
{
   return true;
}
</script>
<div class="content"><!-- 内容 begin  -->
  <div class="main no_l">
    <div class="mainbox">
      <div class="mainbox_R">
		<php>if(!empty($search_key)){</php>
		  <gt name="mid" value="0">
			<div class="right_box">
			  <div id="followTopic" class="followtopic2">
			  	<php>if($followState){</php><a href="javascript:void(0)" onclick="weibo.unfollowTopic('{$search_key_id}','{$search_key}')">取消该话题</a>
				<php>}else{</php><a href="javascript:void(0)" onclick="weibo.followTopic('{$search_key}')">关注该话题</a>
				<php>}</php>
			  </div>
			  <h2><span class="ico_tuijian"></span><a href="javascript:void(0)" onclick="weibo.quickpublish('大家来谈谈#{$search_key}#这个话题吧！')">推荐该话题给朋友</a></h2>
			</div>
		  </gt>
		  <div class="right_box">
		    <h2>其他关注该话题的人</h2>
		    <ul>
		      <volist name="other_following" id="of">
		        <li style="width:33%;" class="left alC">
		          <div class="userPic">
		            <space uid="of['uid']" target="_blank">{uavatar=m}</space>
	              </div>
		          <div class="HOver">
		            <space uid="of['uid']" class="fn" target="_blank">{uname}</space>
	              </div>
	            </li>
	          </volist>
	        </ul>
	    </div>
		  <!-- <input type="button" class="btn_green_w121 hand mr10" value="关注该话题" onclick="weibo.followTopic('{$search_key}')" />
          已关注该话题 <a href="#" class="mr10">取消</a>
          <input type="button" class="btn_green_w121 hand " value="分享该话题" /> -->
		<php>}</php>
        
      </div>
      <div class="mainbox_C">
        <if condition="$topics['topic_id']">
        <div class="topics_info"><if condition="$topics['pic']"><div class="topics_img"><img alt="#{$topics.name}#" src="{:SITE_URL}/data/uploads/{$topics.pic}" /></div></if>
          <dl class="topics_info_dl">
            <dt><span style="color:red">活动规则</span><br />
<br />
</dt>
            <dd>{$topics.content}<if condition="$topics['link']"><a href="{$topics.link}" target="_blank">&gt;&gt;详细</a></if></dd>
          </dl>
        </div>
        </if>	
		
		<div class="talkBox user_talk_bg user_talk_bg2">
          <form method="post" action="{:U('weibo/operate/publish')}" id="miniblog_publish" oncomplete="false">
            <input type="hidden" name="publish_type" value="0">
            <h2>
              <div class="wordNum">你还可以输入<strong id="strconunt">140</strong>字</div>
              <span>快来说点什么吧……</span></h2>
            <div class="cntBox">
              <textarea name="content" id="content_publish" cols="" rows=""style="width:99.3%;_width:99%; height:78px;padding:5px 0;"></textarea>
			  <div id="tag_inputs" style="display:none"></div>
              <div class="txtShadow" style="z-index:-1000"></div>
            </div>
            <div class="funBox">
              <div class="right" style="padding-bottom:5px;"> 
              <label>同步到:<input type="checkbox" name="sync[]" value="sina" id="sina_sync" <php>if($login_bind['sina']){</php>checked<php>}</php> onclick="selectSync(this)"></label>
                <img src="../Public/images/sina.png" align="absmiddle" />
                <input type="button" disabled="true" onclick="weibo.do_publish_zhuanti()" class="btn_big_disable hand" value="&nbsp;" id="publish_handle"  />
              </div>
			 <input id="fenlei_input" name="fenlei_input" type="hidden"/></input>
              <session name="userInfo">
              <div id="publish_type_content_before" class="left">  </div>
			  <else/>
					<a href="{:U('home/Public/login')}">登陆</a>后方可发表微博
					</session>
            </div>
          </form>
        </div>
		
		 <!--宝贝详情  开始-->


        <div id="taobao" style="display: none;">
            <a class="del right" href="javascript:void(0);" onclick="close_taobao();" title="关闭"></a>
          
            <div id="taobao_tip">分享的宝贝</div>
            <div id="taobao_goods_images">
                <a id="click_url_img" href="#"><img id="goods_img" src=""></a>
            </div>

            <div id="taobao_goods_content">
                  
                <ul>
                    <li id="tedit_goods_content_url">
                        <a id="click_url" href="" title="" target="_blank"></a>
                        <input type="hidden" id="cold_goods_form_title" value="">
                    </li>
                    <li>价格：￥<span id="price"></span></li>
                    
				
					<p><div>

                            	
								
								<div class="mt10 cGray2" style="display:none;">自动分类：<span id="fenlei"></span></div>
								<div style="padding-bottom:10px;display: block;height: 20px;"><span class="gred" style="float:left; font-size:14px;">请选择分类：</span>

<ul class="nt_list">

<php>
$i=1;
foreach ($label as $l){
	</php>
	<li><input type="text" id="tag_input{$i}" value="{$l['node_name']}" style="display:none;"><a title="添加分类" href="javascript:;" onclick="doUserTag{$i}()">{$l['node_name']}</a><i></i></li>
	<Script Language=Javascript>
	function doUserTag{$i}(){
		var count=$('#tagcount1').html();
		if(count>0){
			ui.error('最多选择1个分类标签');
		}else{
			var tag=$('#tag_input{$i}').val();
			tag = tag.trim();

			if (tag){
	
				var sum_count=$('#tagcount').html();
				var result=0;
				if (sum_count==0){
				}else{
					/*
					if (sum_count==1){
						if (document.getElementById("goodstag[]").value==tag){
							result=1;
						}
					}else{
						for(var i=0;i<document.getElementById("goodstag[]").length;i++){
							if (document.getElementById("goodstag[]").item(i).value==tag){
								result=1;
							}
						}
					}
					*/
				}
				if (result==0){
					var html= '<li class="alltag" id=Lab'+II+'>'+tag+' <span style="cursor:hand" onClick="Javascript:FUN_REMOVE(\''+II+'\');">X</span></li>';
					var input='<input name="goodstag[]" id=Tag'+II+' type="text" value="'+tag+'">';

					$("#tag").append(html);
					$("#tagcount1").html(parseInt(count)+1);
					$('#tag_inputs').append(input);
					$('#tag_input').val('');

					 var count=$('#tagcount').html();
					$("#tagcount").html(parseInt(count)+1);
					
					II++;
				}
			}else{
				ui.error('请选择分类标签或添加时尚元素标签');
			}
		}	
	}
	</Script>
	<php>
	$i++;
}
</php>



</ul>
								
								
								<span style="display:none;" id="tagcount1">0</span>
								</div>
				<input type="text" id="tag_input" class="text mr5"  maxlength="40" style=" width:320px">
                <a class="btn_w" href="javascript:void(0);" id="add_tag" onclick="doUserTag()">添加(<span id="tagcount">0</span>)</a> 
                <div><span class="gred">多个标签用'逗号'格开。</span>如：<em>复古</em>,<em>日系</em>,<em>公主</em>,<em>OL</em>,<em>纯棉</em>,<em>2011新款</em></div>
					</div>
</p>

                </ul>
					<li> 
					<div style="float:right; display:block;"><a onclick="deleteTag('alltag')" href="javascript:;"><img src="__THEME__/images/close.gif" /></a></div>
					<div style="float:left;"><ul class="tagList" id="tag">
						</ul>
						</div>
                    </li>
            </div>

        </div>


        <!--宝贝详情  结束-->  
		
		
        
        
        
      </div>
    </div>
    <div class="clear"></div>
  </div>


  
       
  
</div>
<div class="content_noapp" style="text-align:left;">
<div class="imagewall_sort clearfix">
 <div class="fl">
        <a>排序：</a>
		<a class="current" href="{:U('home/Look/index',array('cate'=>urlencode($_GET['cate']),'tag'=>urlencode($_GET['tag'])))}">潮流</a>
		<a href="{:U('home/Look/latest',array('cate'=>urlencode($_GET['cate']),'tag'=>urlencode($_GET['tag'])))}">最新</a>
		
		</div>

		

       
    
</div>
<div class="look_content">
       
        
        <div class="look_qiang" id="container"> 

         <volist name="list['data']" id="vo"> 
		 <div class="item" id="list_li_{$vo.weibo_id}">
			<div class="hd"></div>
                  <div class="haibao">
                  		
                        <ul class="pic">
                        
                         
						   <a href="{:U('home/Look/detail',array('id' => $vo['weibo_id']))}" target="_blank" title="<?php $title=unserialize($vo['type_data']); echo $title['g_title'] ?>"><img src="<php>echo $title['small_pic']</php>"></a>
                        </ul>
                        <ul class="jiage">
                         ￥<php>echo $title['price'] </php>
                        </ul>
						<div class="tl">
				
						 
							<span class="mylike">
							
							<php>if(favislove($vo['weibo_id'])=='我'){</php>
                          
                            <a w="f" href="javascript:void(0)" onclick="ui.loveok(this,'1','{$vo.favcount}','{$vo.weibo_id}',{$mid},'{$mid|getUserFace}')" callback="weibo.deletfav({$vo.weibo_id})" class="love add_fav fav" id="favloe_{$vo.weibo_id}">
							<span class="favCount" id="fav_{$vo.weibo_id}">{$vo.favcount}</span><i></i></a>
                            
                             <php>}else{</php>
		            <a w="f" href="javascript:void(0)" onclick="ui.loveok(this,'1','{$vo.favcount}','{$vo.weibo_id}',{$mid},'{$mid|getUserFace}')" callback="weibo.deletfav({$vo.weibo_id})" class="love add_fav fav" id="favloe_{$vo.weibo_id}">
					
					<span class="favCount" id="fav_{$vo.weibo_id}">{$vo.favcount}</span><i></i></a>
					</a>
                          			 
                            <php>}</php>
							</span>
					<span class="tou loveit" id="favicon_{$vo.weibo_id}"> </span>
                             <span class="mypinglun"> 
														<a href="{:U('home/Look/detail',array('id'=>$vo['weibo_id']))}" target="_blank" class="discuss"><b class="nums">{$vo.comment}</b>评论</a></span>
		
			
			
			</div>
							
				<div class="feed_c">
			  <span class="fl">
			  <a rel="_widget_user" id="user_{$vo['uid']}" user_id="{$vo['uid']}" href="{:U('home/Space/index',array('uid'=>$vo['uid']))}" title="{$vo['uid']|getUserName}"><img src="{$vo.uid|getUserface}"></a>
			  </span>
                <p class="msgCnt">由 <a class="username" rel="_widget_user" id="user_{$vo['uid']}" user_id="{$vo['uid']}" href="{:U('home/Space/index',array('uid'=>$vo['uid']))}" title="{$vo['uid']|getUserName}">{$vo['uid']|getUserName}</a> 分享<br />
<span class="mydate">{$vo.ctime|friendlyDate}</span></p>
				
               <div class="tuijiancontent">{$vo.content|format=true}</div>
			   
              
			    
              </div>
                   
                   
                </div>
				
				
				<div class="ft"></div>
				
				</div>
				
               </volist>
            

 			
        </div> 
     

       
      
        
    </div>
	 <div class="c"></div>
        <div class="page">{$list.html}</div>
		</div>
<!-- 内容 end --> 
<php>
echo "<Script Language=Javascript>".chr(10);
echo "var TAG_ARR=new Array();".chr(10);
$I=0;
foreach ($label as $l){
	echo "TAG_ARR[".$I."]='".trim(str_replace('"','',str_replace("'","",$l['node_name'])))."';".chr(10);
	$I++;
}
echo "<\/Script>".chr(10);
</php>

<script>
String.prototype.trim = function()
{
    // 用正则表达式将前后空格
    // 用空字符串替代。
    return this.replace(/(^\s*)|(\s*$)/g, "");
}

function removeHTMLTag(str) {
            str = str.replace(/(^|:\/\/)(\w+\.)?(\w+\.\w+)(?=(\/|$))/,''); //去除HTML tag
            //str = str.replace(/[ | ]*n/g,'n'); //去除行尾空白
            //str = str.replace(/n[s| | ]*r/g,'n'); //去除多余空行
            str=str.replace(/&nbsp;/ig,'');//去掉&nbsp;
            return str;
    }


function doUserTag(){
    var count=$('#tagcount').html();
	if(count>4){
		ui.error('只能输入5个时尚元素标签');
	}else{
		var tag=$('#tag_input').val();
		tag = tag.trim();
		tag = removeHTMLTag(tag);
		if (tag){

			var arr=tag.split(",");
			for (var i=0;i<=arr.length-1;i++){
				var tag=arr[i];
				var tag=tag.trim();
				var tag = removeHTMLTag(tag);

				var result=0;
				if (count==0){
				}else{
					/*
					if (count==1){
						if (document.getElementById("goodstag[]").value==tag){
							result=1;
						}
					}else{
						for(var i=0;i<document.getElementById("goodstag[]").length;i++){
							if (document.getElementById("goodstag[]").item(i).value==tag){
								result=1;
							}
						}
					}
					*/
				}
				if (result==0){

					var html= '<li class=alltag id=Lab'+II+'>'+tag+' <span style="cursor:hand" onClick="Javascript:Fun_Remove(\''+II+'\');">X</span></li>';
					var input='<input name=goodstag[] id=Tag'+II+' type="text" value="'+tag+'">';

					//var html= '<li class="alltag">'+tag+'</li>';
					//var input='<input id="goodstag[]" name="goodstag[]" type="text" value="'+tag+'">';
					$("#tag").append(html);
					$("#tagcount").html(parseInt(count)+1);
					$('#tag_inputs').append(input);
					//$('#content_publish').append('#'+tag+'#');
					$('#tag_input').val('');
					
					II++;

				}
			}
		}else{
			ui.error('请选择分类标签或添加时尚元素标签');
		}
	}
}

function Fun_Remove(I){
	document.getElementById("Lab"+I).style.display='none';
	document.getElementById("Tag"+I).value='';

	var count=$('#tagcount').html();
	var count=parseInt(count);
	if (count>0)
		$('#tagcount').html(count-1);
}
function FUN_REMOVE(I){
	document.getElementById("Lab"+I).style.display='none';
	document.getElementById("Tag"+I).value='';

	var count=$('#tagcount').html();
	var count=parseInt(count);
	if (count>0)
		$('#tagcount').html(count-1);
	
	var count=$('#tagcount1').html();
	var count=parseInt(count);
	if (count>0)
		$('#tagcount1').html(count-1);
}

function deleteTag(o){
	$('.'+o).remove();
	$('.'+o).hide();
	var content=$('#content_publish').html();
	$('#content_publish').html(content.replace('#'+o+'#',''));
	$('#tag_inputs').html(content.replace('#'+o+'#',''));
	var count=0;
	$("#tagcount").html(0);
	$("#tagcount1").html(0);
}




function close_taobao(){
   $('#taobao').hide();
   $('.talkPop').remove();
}

</script>

<include file="__THEME__/footer" /> 